{include file="layout/layout" /}
<script src="__PUBLIC__/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>商品订单</h3>
        <h5>商城实物商品交易订单查询及管理</h5>
      </div>
    </div>
  </div>
  <!-- 操作说明 -->
  <div id="explanation" class="explanation" style=" width: 99%; height: 100%;">
    <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span title="收起提示" id="explanationZoom" style="display: block;"></span>
    </div>
     <ul>
      <li>查看操作可以查看订单详情, 包括支付费用, 商品详情等</li>
      <li>未支付的订单可以取消</li>
      <li>用户收货后, 如果没有点击"确认收货",系统自动根据设置的时间自动收货.</li>
    </ul>
  </div>
  <div class="flexigrid">
    <div class="mDiv">
      <div class="ftitle">
        <h3>订单列表</h3>
        <h5>(共{$ordercount}条记录)</h5>
      </div>
      <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
    <form class="navbar-form form-inline" method="post" action="{:url('orderlist')}">
      <div class="sDiv">
        <div class="sDiv2">
          <input size="30" id="add_time_begin" name="add_time_begin" value="{$add_time_begin}" class="qsbox" placeholder="下单开始时间" type="text">
        </div>
        <div class="sDiv2">
          <input size="30" id="add_time_end" name="add_time_end" value="{$add_time_end}" class="qsbox" placeholder="下单结束时间" type="text">
        </div>
        <div class="sDiv2">
          <select name="ord_status" class="select sDiv3" style="margin-right:5px;margin-left:5px">
              <option value="0" {if $ord_status==0}selected="selected"{/if}>支付状态</option>
              <option value="-1"{if $ord_status==-1}selected="selected"{/if}>未支付</option>
              <option value="1"{if $ord_status==1}selected="selected"{/if}>已支付</option>
          </select>
        </div>
         <div class="sDiv2">
          <input size="30" name="ord_num" class="qsbox" value="{$ord_num}" placeholder="订单号搜索..." type="text">
        </div>
        <div class="sDiv2">
          <input id='button_search' class="btn" value="搜索" type="submit">
        </div>
      </div>
     </form>
    </div>
    <div class="hDiv">
      <div class="hDivBox" id="ajax_return">
        <table cellspacing="0" cellpadding="0">
          <thead>
            <tr>
                <th axis="col0">
                  <div style="width: 24px;"><i class="ico-check"></i></div>
                </th>
                <th abbr="order_sn" axis="col3" class="" align="left">
                  <div style="text-align: center; width: 60px;" class="">订单ID</div>
                </th>
                <th abbr="consignee" axis="col4" class="" align="left">
                  <div style="text-align: center; width: 80px;" class="">订单编号</div>
                </th>
                <th abbr="article_show" axis="col5" class="" align="center">
                  <div style="text-align: center; width: 80px;" class="">用户</div>
                </th>
                <th abbr="article_time" axis="col6" class="" align="center">
                  <div style="text-align: center; width: 80px;" class="">商户</div>
                </th>
                <th abbr="article_time" axis="col6" class="" align="center">
                  <div style="text-align: center; width: 60px;" class="">支付状态</div>
                </th>
                <th abbr="article_time" axis="col6" class="" align="center">
                  <div style="text-align: center; width: 80px;" class="">总金额</div>
                </th>
                <!--<th abbr="article_time" axis="col6" class="" align="center">-->
                  <!--<div style="text-align: center; width: 80px;" class="">实付金额</div>-->
                <!--</th>-->
                <!--<th abbr="article_time" axis="col6" class="" align="center">-->
                  <!--<div style="text-align: center; width: 80px;" class="">优惠金额</div>-->
                <!--</th>-->
                <!--<th abbr="article_time" axis="col6" class="" align="center">-->
                  <!--<div style="text-align: center; width: 60px;" class="">优惠券ID</div>-->
                <!--</th> -->
                <th abbr="article_time" axis="col6" class="" align="center">
                  <div style="text-align: center; width: 60px;" class="">返还优惠券</div>
                </th>
                <th abbr="article_time" axis="col6" class="" align="center">
                  <div style="text-align: center; width: 120px;" class="">下单时间</div>
                </th>
                <!-- <th axis="col1" class="handle" align="left">
                  <div style="text-align: left; width: 80px;">操作</div>
                </th> -->
              </tr>
            </thead>
        </table>
      </div>
    </div>
    <div class="tDiv">
      <div class="tDiv2">
        <div class="fbutton">
           <a href="/index.php/index/order/export_order/shop_id/{}">
              <div class="add" title="选定行数据导出excel文件,如果不选中行，将导出列表所有数据">
                <span><i class="fa fa-plus"></i>导出数据</span>
              </div>
            </a>
          </div>
      </div>
      <div style="clear:both"></div>
    </div>
    <div class="bDiv" style="height: auto;">
<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
<table>
  <tbody>
    {foreach $orderlist as $v}
      <tr data-order-id="1508" id="1508">
        <td class="sign" axis="col0">
          <div style="width: 24px;"><i class="ico-check"></i></div>
        </td>
        <td abbr="order_sn" axis="col3" class="" align="left">
          <div style="text-align: center; width: 60px;" class="">{$v.ord_id}</div>
        </td>
        <td abbr="consignee" axis="col4" class="" align="left">
          <div style="text-align: center; width: 80px;" class="">{$v.ord_num}</div>
        </td>
        <td abbr="article_show" axis="col5" class="" align="center">
          <div style="text-align: center; width: 80px;" class="">{$v.nick_name}</div>
        </td>
        <td abbr="article_time" axis="col6" class="" align="center">
          <div style="text-align: center; width: 80px;" class="">{$v.sp_name}</div>
        </td>
        <td abbr="article_time" axis="col6" class="" align="center">
          <div style="text-align: center; width: 60px;" class="">
              {switch $v.ord_status}
              {case -1}未付款{/case}
              {case  1}已付款{/case}
              {/switch}
          </div>
        </td>
        <td abbr="article_time" axis="col6" class="" align="center">
          <div style="text-align: center; width: 80px;" class="">{$v.ord_total_price}</div>
        </td>
        <!--<td abbr="article_time" axis="col6" class="" align="center">-->
          <!--<div style="text-align: center; width: 80px;" class="">{$v.ord_real_price}</div>-->
        <!--</td>-->
        <!--<td abbr="article_time" axis="col6" class="" align="center">-->
          <!--<div style="text-align: center; width: 80px;" class="">{$v.ord_cou_price}</div>-->
        <!--</td>-->
        <!--<td abbr="article_time" axis="col6" class="" align="center">-->
          <!--<div style="text-align: center; width: 60px;" class="">{$v.ord_cou_id}</div>-->
        <!--</td> -->
          <td abbr="article_time" axis="col6" class="" align="center">
          <div style="text-align: center; width: 60px;" class=""></div>
        </td>
        <td abbr="article_time" axis="col6" class="" align="center">
          <div style="text-align: center; width: 120px;" class="">{$v.ord_create_time|date='Y-m-d H:i:s'}</div>
        </td>
        <!-- <td axis="col1" class="handle" align="left">
            <div style="text-align: left; ">
              <a class="btn green" href="http://www.tptp.com/index.php/Admin/order/detail/order_id/1508"><i class="fa fa-list-alt"></i>查看</a>
            </div>
        </td> -->
        <td style="width: 100%;">
            <div></div>
        </td>
      </tr>
      {/foreach}
  </tbody>
</table>
</div>
<div class="iDiv" style="display: none;"></div>
</div>
<!--分页位置-->
{$orderlist->render()|raw}
</div>
</div>
</body></html>


<script type="text/javascript">
$(document).ready(function(){
    // 表格行点击选中切换
    $('#flexigrid > table>tbody >tr').click(function(){
        $(this).toggleClass('trSelected');
    });
    // 点击刷新数据
    $('.fa-refresh').click(function(){
        location.href = location.href;
    });
    laydate({
        elem: '#add_time_begin', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        range: true
    });
    laydate({
        elem: '#add_time_end', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        range: true,
    });

//    getDate('#add_time_begin');
//　　getDate('#add_time_end');
});
</script>
